package org.example;

import blackjack.Card;
import blackjack.Deck;
import blackjack.Hand;
import people.Dealer;
import people.Player;

public class Main {
    // 测试代码
    public static void main(String[] args) {
        Deck deck = new Deck();
        deck.shuffle();
//        Hand hand = new Hand();
//        hand.addCard(deck.drawCard());
//        hand.addCard(deck.drawCard());
//        System.out.println(deck.getDeckSize() + " cards remained.");
//        hand.displayHand();
//        System.out.println(hand.calculatePoints());
//        if (hand.isBusted()) {
//            System.out.println("Boom!");
//        }
//        if (hand.isBlackJack()) {
//            System.out.println("BlackJack!");
//        }

        // Person 测试
//        Player x = new Player(1,500);
//        System.out.println("玩家id为"+x.getID());
//        System.out.println("玩家余额为"+x.getMoney());
//        x.addBet(200);
//        System.out.println("玩家下注了"+x.getBet()+"，余额为"+x.getMoney());
//        x.emptyBet();
//        System.out.println("清空赌注，剩余赌注为"+x.getBet());
//        System.out.println("玩家下注了"+x.getBet()+"，余额为"+x.getMoney());
//        x.addMoney(100);
//        System.out.println("赚了100，玩家当前余额"+x.getMoney());
//
//        x.addCard(deck.drawCard());
//        System.out.println("玩家卡牌:");
//        x.getHand().displayHand();
//        System.out.println("当前点数为"+x.getBestPoint());
//        System.out.println("是否爆牌"+x.getBusted());
//
//        x.addCard(deck.drawCard());
//        System.out.println("玩家卡牌:");
//        x.getHand().displayHand();
//        System.out.println("当前点数为"+x.getBestPoint());
//        System.out.println("是否爆牌"+x.getBusted());
//
//        x.addCard(deck.drawCard());
//        System.out.println("玩家卡牌:");
//        x.getHand().displayHand();
//        System.out.println("当前点数为"+x.getBestPoint());
//        System.out.println("是否爆牌"+x.getBusted());
//
//        x.emptyHand();
//        System.out.println("清空卡牌:");
//        x.getHand().displayHand();
//        System.out.println("当前点数为"+x.getBestPoint());
//        System.out.println("是否爆牌"+x.getBusted());

        //Dealer测试
        Dealer y = new Dealer();
        y.getTwoCards(deck);
        System.out.println("拿了两张牌，庄家卡牌:");
        y.getHand().displayHand();
        System.out.println("当前点数为"+y.getBestPoint());
        System.out.println("是否爆牌"+y.getBusted());

        y.supplementCards(deck);
        System.out.println("补充牌后，庄家卡牌:");
        y.getHand().displayHand();
        System.out.println("当前点数为"+y.getBestPoint());
        System.out.println("是否爆牌"+y.getBusted());
    }
}